Optimal. Leaf size=157 \[ -\frac {2 b \left (2 a^2-b^2\right ) x^{-n} (e x)^n \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a^2 d e n (a-b)^{3/2} (a+b)^{3/2}}+\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a d e n \left (a^2-b^2\right ) \left (a+b \sec \left (c+d x^n\right )\right )}+\frac {(e x)^n}{a^2 e n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {4208, 4204, 3785, 3919, 3831, 2659, 208} \[ -\frac {2 b \left (2 a^2-b^2\right ) x^{-n} (e x)^n \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a^2 d e n (a-b)^{3/2} (a+b)^{3/2}}+\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a d e n \left (a^2-b^2\right ) \left (a+b \sec \left (c+d x^n\right )\right )}+\frac {(e x)^n}{a^2 e n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 208
Rule 2659
Rule 3785
Rule 3831
Rule 3919
Rule 4204
Rule 4208
Rubi steps
\begin {align*} \int \frac {(e x)^{-1+n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx &=\frac {\left (x^{-n} (e x)^n\right ) \int \frac {x^{-1+n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx}{e}\\ &=\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{(a+b \sec (c+d x))^2} \, dx,x,x^n\right )}{e n}\\ &=\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a \left (a^2-b^2\right ) d e n \left (a+b \sec \left (c+d x^n\right )\right )}-\frac {\left (x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {-a^2+b^2+a b \sec (c+d x)}{a+b \sec (c+d x)} \, dx,x,x^n\right )}{a \left (a^2-b^2\right ) e n}\\ &=\frac {(e x)^n}{a^2 e n}+\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a \left (a^2-b^2\right ) d e n \left (a+b \sec \left (c+d x^n\right )\right )}+\frac {\left (\left (-a^2 b+b \left (-a^2+b^2\right )\right ) x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {\sec (c+d x)}{a+b \sec (c+d x)} \, dx,x,x^n\right )}{a^2 \left (a^2-b^2\right ) e n}\\ &=\frac {(e x)^n}{a^2 e n}+\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a \left (a^2-b^2\right ) d e n \left (a+b \sec \left (c+d x^n\right )\right )}+\frac {\left (\left (-a^2 b+b \left (-a^2+b^2\right )\right ) x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx,x,x^n\right )}{a^2 b \left (a^2-b^2\right ) e n}\\ &=\frac {(e x)^n}{a^2 e n}+\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a \left (a^2-b^2\right ) d e n \left (a+b \sec \left (c+d x^n\right )\right )}+\frac {\left (2 \left (-a^2 b+b \left (-a^2+b^2\right )\right ) x^{-n} (e x)^n\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a^2 b \left (a^2-b^2\right ) d e n}\\ &=\frac {(e x)^n}{a^2 e n}-\frac {2 b \left (2 a^2-b^2\right ) x^{-n} (e x)^n \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a^2 (a-b)^{3/2} (a+b)^{3/2} d e n}+\frac {b^2 x^{-n} (e x)^n \tan \left (c+d x^n\right )}{a \left (a^2-b^2\right ) d e n \left (a+b \sec \left (c+d x^n\right )\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.93, size = 191, normalized size = 1.22 \[ \frac {x^{-n} (e x)^n \left (\sqrt {a^2-b^2} \left (b \left (\left (a^2-b^2\right ) \left (c+d x^n\right )+a b \sin \left (c+d x^n\right )\right )+a \left (a^2-b^2\right ) \left (c+d x^n\right ) \cos \left (c+d x^n\right )\right )-2 b \left (b^2-2 a^2\right ) \left (a \cos \left (c+d x^n\right )+b\right ) \tanh ^{-1}\left (\frac {(b-a) \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )\right )}{a^2 d e n (a-b) (a+b) \sqrt {a^2-b^2} \left (a \cos \left (c+d x^n\right )+b\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 628, normalized size = 4.00 \[ \left [\frac {2 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d e^{n - 1} x^{n} \cos \left (d x^{n} + c\right ) + 2 \, {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} d e^{n - 1} x^{n} + 2 \, {\left (a^{3} b^{2} - a b^{4}\right )} e^{n - 1} \sin \left (d x^{n} + c\right ) + {\left ({\left (2 \, a^{3} b - a b^{3}\right )} \sqrt {a^{2} - b^{2}} e^{n - 1} \cos \left (d x^{n} + c\right ) + {\left (2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {a^{2} - b^{2}} e^{n - 1}\right )} \log \left (\frac {2 \, a b \cos \left (d x^{n} + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x^{n} + c\right )^{2} + 2 \, a^{2} - b^{2} - 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d x^{n} + c\right ) + \sqrt {a^{2} - b^{2}} a\right )} \sin \left (d x^{n} + c\right )}{a^{2} \cos \left (d x^{n} + c\right )^{2} + 2 \, a b \cos \left (d x^{n} + c\right ) + b^{2}}\right )}{2 \, {\left ({\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} d n \cos \left (d x^{n} + c\right ) + {\left (a^{6} b - 2 \, a^{4} b^{3} + a^{2} b^{5}\right )} d n\right )}}, \frac {{\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d e^{n - 1} x^{n} \cos \left (d x^{n} + c\right ) + {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} d e^{n - 1} x^{n} + {\left (a^{3} b^{2} - a b^{4}\right )} e^{n - 1} \sin \left (d x^{n} + c\right ) - {\left ({\left (2 \, a^{3} b - a b^{3}\right )} \sqrt {-a^{2} + b^{2}} e^{n - 1} \cos \left (d x^{n} + c\right ) + {\left (2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {-a^{2} + b^{2}} e^{n - 1}\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \cos \left (d x^{n} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \sin \left (d x^{n} + c\right )}\right )}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} d n \cos \left (d x^{n} + c\right ) + {\left (a^{6} b - 2 \, a^{4} b^{3} + a^{2} b^{5}\right )} d n}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e x\right )^{n - 1}}{{\left (b \sec \left (d x^{n} + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 1.33, size = 704, normalized size = 4.48 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.33, size = 461, normalized size = 2.94 \[ \frac {\frac {b^2\,x\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}}{a\,d\,n\,x^n\,\left (a^2-b^2\right )}+\frac {b^3\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}}{a^2\,d\,n\,x^n\,\left (a^2-b^2\right )}}{a+a\,{\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x^n\,2{}\mathrm {i}}+2\,b\,{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x^n\,1{}\mathrm {i}}}+\frac {x\,{\left (e\,x\right )}^{n-1}}{a^2\,n}+\frac {b\,x\,\ln \left (-2\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,\left (b^3\,x\,{\left (e\,x\right )}^{n-1}-2\,a^2\,b\,x\,{\left (e\,x\right )}^{n-1}\right )-\frac {b\,x\,\left (a^4-a^2\,b^2\right )\,\left (a+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )\,{\left (e\,x\right )}^{n-1}\,\left (2\,a^2-b^2\right )\,2{}\mathrm {i}}{a^2\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}\right )\,{\left (e\,x\right )}^{n-1}\,\left (2\,a^2-b^2\right )}{a^2\,d\,n\,x^n\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}-\frac {b\,x\,\ln \left (-2\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,\left (b^3\,x\,{\left (e\,x\right )}^{n-1}-2\,a^2\,b\,x\,{\left (e\,x\right )}^{n-1}\right )+\frac {b\,x\,\left (a^4-a^2\,b^2\right )\,\left (a+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )\,{\left (e\,x\right )}^{n-1}\,\left (2\,a^2-b^2\right )\,2{}\mathrm {i}}{a^2\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}}\right )\,{\left (e\,x\right )}^{n-1}\,\left (2\,a^2-b^2\right )}{a^2\,d\,n\,x^n\,{\left (a+b\right )}^{3/2}\,{\left (a-b\right )}^{3/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________